#!/bin/bash


if [ -e /sys/fs/cgroup/systemd ]; then
        case "$2" in
                up)
                              systemctl start ntpd.service
                ;;
                down)
                              systemctl stop ntpd.service
                ;;
        esac
else
        if [ -e "/etc/rc.d/ntpd" ]; then
                case "$2" in
                        up)
                                rc.d start ntpd
                        ;;
                        down)
                                rc.d stop ntpd
                        ;;
                esac
        fi

fi
